export const PAGE_CODE = 'dcs-parts-partOrderPi';
import {PAGE_TEN} from '../constants';

export const formatPrintExcelUrl = (id, code) => `/parts/print/reportexcel.html?id=${id}&prefix=${code}&name=PartOrderPi&title=${encodeURI('备件PI')}`;
export const formatPrintPdfUrl = (id, code) => `/parts/print/reportpdf.html?id=${id}&prefix=${code}&name=PartOrderPi&title=${encodeURI('备件PI')}`;

export const DEFAULT_QUERY_OPTION = {
    dealerId: '',
    brandId: '',
    partOrderCode: '',
    partOrderTypeId: '',
    status: undefined,
    customerOrderCode: '',
    submitTime: undefined,
    pageIndex: PAGE_TEN.index,
    pageSize: PAGE_TEN.size,
    sortField: 'createTime',
    isDesc: true
};
// 操作权限
export const PERMISSION = {
    add: 'add',
    update: 'update',
    abandon: 'abandon',
    create: 'create',
    confirm: 'confirm',
    printExcel: 'printExcel',
    printPdf: 'printPdf',
    audit: 'audit',
    cancel: 'cancel',
    historySearch: 'historySearch'
};

export const HISTORY_DEFAULT_QUERY_OPTION = {
    partOrderCode: '',
    dealerId: '',
    orderTypeHis: undefined,
    partPIStatusHis: undefined,
    customerOrderCode: '',
    submitTime: [],
    pageIndex: PAGE_TEN.index,
    pageSize: PAGE_TEN.size,
};
